Optimal. Leaf size=80 \[ \frac {(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac {(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (x+1)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {853, 1635, 789, 653, 216} \[ \frac {(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac {(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (x+1)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 216
Rule 653
Rule 789
Rule 853
Rule 1635
Rubi steps
\begin {align*} \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx &=\int \frac {(1+x)^4 (f+g x)^2}{\left (1-x^2\right )^{7/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}-\frac {1}{5} \int \frac {(1+x)^3 \left (-f^2+8 f g+4 g^2+5 g^2 x\right )}{\left (1-x^2\right )^{5/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+g^2 \int \frac {(1+x)^2}{\left (1-x^2\right )^{3/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \int \frac {1}{\sqrt {1-x^2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.14, size = 91, normalized size = 1.14 \[ \frac {\sqrt {1-x^2} \left ((x+1)^{3/2} \left (f^2 (x-4)+f g (2-8 x)+g^2 (x-4)\right )-20 \sqrt {2} g^2 (x-1) \, _2F_1\left (-\frac {3}{2},-\frac {3}{2};-\frac {1}{2};\frac {1-x}{2}\right )\right )}{15 (x-1)^3 \sqrt {x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.22, size = 193, normalized size = 2.41 \[ \frac {2 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{3} - 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} + 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x + 30 \, {\left (g^{2} x^{3} - 3 \, g^{2} x^{2} + 3 \, g^{2} x - g^{2}\right )} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + {\left ({\left (f^{2} - 8 \, f g - 39 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} - 3 \, {\left (f^{2} + 2 \, f g - 19 \, g^{2}\right )} x\right )} \sqrt {-x^{2} + 1}}{15 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.35, size = 266, normalized size = 3.32 \[ -g^{2} \arcsin \relax (x) + \frac {2 \, {\left (4 \, f^{2} - 2 \, f g + 24 \, g^{2} + \frac {5 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} - \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {105 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {25 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {165 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} - \frac {30 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {75 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}} + \frac {15 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}}\right )}}{15 \, {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} + 1\right )}^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 125, normalized size = 1.56 \[ \left (-\arcsin \relax (x )+\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{\left (x -1\right )^{2}}+\sqrt {-2 x -\left (x -1\right )^{2}+2}\right ) g^{2}+\frac {2 \left (f +g \right ) \left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}} g}{3 \left (x -1\right )^{3}}+\left (f^{2}+2 f g +g^{2}\right ) \left (\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{5 \left (x -1\right )^{4}}-\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{15 \left (x -1\right )^{3}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (g x + f\right )}^{2} \sqrt {-x^{2} + 1}}{{\left (x - 1\right )}^{4}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.96, size = 164, normalized size = 2.05 \[ \sqrt {1-x^2}\,\left (\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{x-1}-\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{{\left (x-1\right )}^2}\right )-\sqrt {1-x^2}\,\left (\frac {\frac {2\,f^2}{5}+\frac {4\,f\,g}{5}+\frac {2\,g^2}{5}}{{\left (x-1\right )}^3}+\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{x-1}-\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{{\left (x-1\right )}^2}\right )-g^2\,\mathrm {asin}\relax (x)-\frac {\sqrt {1-x^2}\,\left (4\,g^2+2\,f\,g\right )}{x-1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {- \left (x - 1\right ) \left (x + 1\right )} \left (f + g x\right )^{2}}{\left (x - 1\right )^{4}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________